Creating a university\'s timetable is a complex optimization problem with many constraints, which often leads to inefficient or error prone results. This paper proposes an automated end-to-end university timetable generation system that is configurable, and developed using Constraint Programming and the Google’s CP-SAT Solver. The system allows users to define their constraints via a domain specific language, which facilitates a flexible means of creating diverse academic scenario models. The modular architecture separates the modeling of constraints from the optimization model, allowing non-expert users to create complex rules without needing to interact with the solver. Additionally, the system is implemented as an Asynchronous web-based back-end to support real-time handling of scheduling tasks. Its deployment in a live environment has demonstrated its effectiveness in scheduling conflict free time-tables for universities.
Introduction
The paper presents an automated university timetable generation system designed to replace manual, error-prone scheduling methods that struggle with conflicts in rooms, teachers, and time slots. Since timetabling is an NP-hard problem, the system uses Google’s CP-SAT constraint solver to efficiently search for optimal or feasible schedules.
To improve usability, the system introduces a full-stack web architecture where users input data through a Next.js interface, while backend processing is handled asynchronously using FastAPI, Redis queues, and worker processes. This ensures that heavy computation does not slow down the user experience. The final timetable is stored in a PostgreSQL database and can be viewed or manually edited through an interactive interface.
A key innovation is a domain-specific language (DSL) that allows non-expert users to define scheduling constraints easily using a structured FORALL–WHERE–ASSERT format, which is translated into formal mathematical constraints for the solver.
The system enforces essential constraints such as avoiding student and faculty schedule conflicts, ensuring room availability, and meeting curriculum requirements. Experiments show that the solver can generate valid schedules in seconds to under a minute depending on complexity, significantly outperforming manual scheduling.
Conclusion
The new scheduling system is a combination of theoretical combinatorial optimization and the practicalities of managing a university. It does this by integrating Google\'s CP-SAT solver into a distributed, asynchronous web architecture that allows it to automatically generate conflict-free schedules. The results of the experiment show a high degree of scalability for this architecture with medium-sized university instances that can produce optimal or strictly feasible schedules in seconds.
Creating a custom domain-specific language to separate the complex mathematical formulation from the user interface allows end-users to have considerable flexibility and dynamics in building constraints. The new DSL described here does not serve exclusively as a way to configure an interface; however the proposed solution builds on these capabilities by adding additional features and functionality such as allowing users to write constraints using quantified variables (FORALL), filter conditions based on those variables, aggregate data (SUM), and determine causal relationships between two objects (IMPLIES).
Future work will consider further democratizing the definition of constraints. The standard JSON format of the underlying DSL means that a Large Language Model could be trained to eliminate the need to define syntax rules manually and therefore allow administrative staff to completely configure highly-constrained timetabling models using conversational prompts.
References
[1] E. K. Burke and S. Petrovic, “Recent research directions in automated timetabling,” European Journal of Operational Research, vol. 140, no. 2, pp. 266–280, 2002.
[2] M. W. Carter and G. Laporte, “Recent developments in practical course timetabling,” in Practice and Theory of Automated Timetabling II, E. Burke and M. Carter, Eds., Lecture Notes in Computer Science, vol. 1408. Berlin, Germany: Springer, 1998.
[3] A. Schaerf, “A survey of automated timetabling,” Artificial Intelligence Review, vol. 13, pp. 87–127, 1999.
[4] L. Perron and F. Didier, CP-SAT, version 9.15, Google, 2026. [Online]. Available: https://developers.google.com/optimization/cp/cp\\_solver. [Accessed: April 15, 2026].
[5] J. A. Garcia Yañez, F. J. Ramirez Saenz, E. L. Rios Saldaña, M. A. Rubio Aguilar, I. E. Barrios Flores, C. L. Garcia Flores, R. E. Hernandez Cerda, and J. J. Zacarias Ortiz, “Development of a web-based timetabling software for a Mexican university,” TAMIU Working Papers, 2024. [Online]. Available: https://www.tamiu.edu/cswht/documents/wp-2024-006-garcia-yanez.pdf.Accessed: Apr. 15, 2026.
[6] G. K. Keerthan, G. K. Praveen, C. M. Darshan, M. B. Nanda, and H. B. Sundeep Patil, “Automated timetable generation using constraint programming,” International Journal for Multidisciplinary Research (IJFMR), 2025.
[7] M. M. Alansari, “Optimized automatic course timetabling service architecture for integration with vendor management systems,” International Journal of Advanced Computer Science and Applications, pp. 878–890, 2022.
[8] T. Müller, “ITC2007 solver description: a hybrid approach,” Annals of Operations Research, vol. 172, pp. 429–446, 2009.
[9] S. Abdullah, H. Turabieh, B. McCollum, and P. McMullan, “A hybrid metaheuristic approach to the university course timetabling problem,” Journal of Heuristics, vol. 18, pp. 1–23, 2012.
[10] S. M. Al-Yakoob and H. D. Sherali, “Mixed-integer programming models for an employee scheduling problem with multiple shifts and work locations,” Annals of Operations Research, vol. 155, pp. 119–142, 2007.
[11] É. J. B. Moreira and S. A. A. De Freitas, \"A CP-SAT Approach for Academic Resource Timetabling in Higher Education Institutions: A Case Study at a Major Public University,\" 2024 21st International Conference on Information Technology Based Higher Education and Training (ITHET), Paris, France, 2024, pp.1-8.